package com.example.spring.demo.common.error;

/**
 * @author qwert
 * @version 1.0.0
 * @create 2024/12/25 21:58
 **/
public enum ErrorCodeEnum {

    //00 为系统保存
    SYSTEM_ERROR("AE100001", "系统内部错误"),
    TEST_CUSTOM_ERROR("AE100002", "测试触发自定义异常"),

    //01 为用户相关报错
    USER_IS_NULL("AE10" + "01" + "01", "用户不存在"),

    //02 为用户登录状态报错 AE100201
    USER_LOG_ERROR("AE10" + "02" + "01", "登录状态错误，请重新登录"),

    //05 为Message报错
    MESSAGE_IS_NULL("AE10" + "05" + "01", "未查询到消息"),
    MESSAGE_SAVE_FAIL("AE10" + "05" + "02", "保存消息失败"),

    // 06 task任务报错
    TASK_IS_NULL("AE10" + "06" + "01", "任务为空"),
    TASK_SAVE_FAIL("AE10" + "06" + "02", "任务保存失败");

    private final String errorCode;
    private final String errorMessage;

    ErrorCodeEnum(String errorCode, String errorMessage) {
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }
    public String getErrorCode() {
        return errorCode;
    }

    public String getErrorMessage() {
        return errorMessage;
    }
}
